home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-02-04 | 2.7 KB | 152 lines | [CTPP/CTMP] |
- % button text
- % Gregory Kruckewitt
- % 3-March-87
- % var for fill page
- /TM 496 def
- /BM 296 def
- /LM 206 def
- /RM 406 def
- /newline
- { currentpoint Size3 1.20 mul sub
- exch pop LM
- exch moveto } def
-
- /nllfNec
- { currentpoint pop RM gt
- {newline} if } def
-
- /done?
- { currentpoint exch pop BM lt } def
-
- /fillpage
- {
- /strg exch def
- { { pop pop nllfNec} strg kshow
- done? {exit} if
- } loop
- } def
- /outsidecircletext
- {circtextdict begin
- /radius exch def
- /centerangle exch def
- /ptsize exch def
- /str exch def
- /xradius radius ptsize 4 div add def
-
- gsave
- centerangle str findhalfangle add rotate
-
- str
- {/charcode exch def
- ( ) dup 0 charcode put outsideplacechar
- }forall
- grestore
- end
- }def
-
- /insidecircletext
- {circtextdict begin
- /radius exch def /centerangle exch def
- /ptsize exch def /str exch def
-
- /xradius radius ptsize 3 div sub def
- gsave
- centerangle str findhalfangle sub rotate
- str
- {/charcode exch def
- ( ) dup 0 charcode put insideplacechar
- }forall
- grestore
- end
- }def
-
- /circtextdict 16 dict def
- circtextdict begin
- /findhalfangle
- {stringwidth pop 2 div
- 2 xradius mul pi mul div 360 mul
- }def
-
-
- /outsideplacechar
- {/char exch def
- /halfangle char findhalfangle def
- gsave
- halfangle neg rotate
- radius 0 translate
- -90 rotate
- char stringwidth pop 2 div neg 0 moveto
- char show
- grestore
- halfangle 2 mul neg rotate
- }def
-
- /insideplacechar
- {/char exch def
- /halfangle char findhalfangle def
- gsave
- halfangle rotate
- radius 0 translate
- 90 rotate
- char stringwidth pop 2 div neg 0 moveto
- char show
- grestore
- halfangle 2 mul rotate
- }def
-
- /pi 3.1415923 def
- end
-
- /Badge
- {
- Fontname1 findfont Size1 scalefont setfont
-
- topline % top of circle text var from turbo
-
- Size1 90 65 outsidecircletext
- Fontname2 findfont Size2 scalefont setfont
-
- bottomline % bottom of circle text var from turbo
-
- Size2 270 70 insidecircletext
-
- } def
- /cutline
- {newpath .5 setgray 0 0 98 0 360 arc closepath clip} def % stroke 0 setgray draw circle?
- /cutline2
- {newpath .5 setgray 0 0 98 0 360 arc stroke closepath } def % stroke 0
- /fitit % auto sizing routine
- { /str exch def
- /size exch def
- { size 1 sub
- Fontname4 findfont size scalefont setfont
- str dup stringwidth pop 145 gt
- { fitit size Name} { exit} ifelse
- } loop
- } def
- % START THE PROCESS
- gsave
- 306 396 translate cutline
-
- Fontname3 findfont Size3 scalefont setfont
- -306 -396 translate LM TM moveto
- .8 setgray
- background ( ) eq {/background ( ) def} if
- background fillpage clip
-
- grestore
- gsave
- 306 396 translate cutline2
- grestore
- % Place the badge 4 times on page
- gsave 306 396 translate Badge grestore % upper left
-
- % lets try one name
- gsave
- Size4 Name fitit
- 306 Name stringwidth pop 2 div sub 396 moveto Name show grestore
-
-
- % /#copies 1 def % number of pages
- showpage
-